UST924001I4

ABSTRACT

IN THIS EXPRESSION (LL/LS) IS THE RATIO OF THE EXPECTED LENGTH OF A LONGER STRING TO THAT OF A SHORTER STRING, M IS THE MERGE ORDER, K IS AN INTEGER SUCH THAT MK$N/LS&lt;MK+1 AND N IS THE NUMBER OF RECORDS TO BE SORTED. THE EXPRESSION FOR P IS USED IN THE SITUATION WHERE LL/LS&lt;M-1. THE CASE IN WHICH LL/LS IS GREATER THAN M-1 CAN BE HANDLED BY AN ANALOGOUS ANALYSIS IN ACCORDANCE WITH THE INVENTIVE PRINCIPLE, THAT A GAIN IN PERFORMANCE RESULTS WHENEVER A LONG STRING REPLACES A SHORT STRING WHICH IS MERGED LESS THAN A MAXIMAL NUMBER OF TIMES.   (MK+1-(N/LS))/M-(LL/LS)).   A METHOD IS DISCLOSED FOR PROVIDING A GENERAL PURPOSE SORT. IN THIS METHOD, AN INPUT SEQUENCE OF RECORDS IS SORTED INTO TWO SETS OF STRINGS, THE EXPECTED LENGHTS OF EACH OF THE STRINGS WITHIN A SET BEING SUBSTANTIALLY EQUAL, THE EXPECTED LENGTH OF THE STRINGS OF ONE SET BEING LONGER THAN THAT OF THE STRINGS OF THE OTHER SET. A MERGE IS FIRST CARRIED OUT OF THE SHORTER LENGTH STRINGS TO PROVIDE A SET OF MERGED STRINGS. THIS LATTER SET OF MERGED STRINGS IS THEN MERGED WITH THE AFOREMENTIONED SET OF LONG STRINGS. THE NUMBER P OF LONGER STRINGS TO BE GENERATED CAN BE DETERMINED BY THE EXPRESSION P=INTEGER PART OF



